<template>
  <div>
    <el-card>
      <h3>上传记录</h3>
    </el-card>
    <el-card>
      <div>
        <el-form :inline="true" :model="UplineRecord">
          <el-form-item label="上传用户:">
            <el-input v-model="UplineRecord.RecordUser" placeholder="用户ID/账号" clearable></el-input>
          </el-form-item>
          <el-form-item label="文件名:">
            <el-input v-model="UplineRecord.RecordName" placeholder="用户ID/账号" clearable></el-input>
          </el-form-item>
          <el-form-item>
            <el-button type="primary">查询</el-button>
          </el-form-item>
          <el-form-item>
            <el-button @click="Resetting">重置</el-button>
          </el-form-item>
        </el-form>
      </div>
      <el-table :data="RecordList" style="width: 100%">
        <el-table-column prop="date" label="日期" width="180">
        </el-table-column>
        <el-table-column prop="name" label="姓名" width="180">
        </el-table-column>
        <el-table-column prop="address" label="地址">
        </el-table-column>
      </el-table>
    </el-card>
  </div>
</template>

<script>
export default {
  data() {
    return {
      RecordList: [{
        date: '2016-05-02',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1518 弄'
      }, {
        date: '2016-05-04',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1517 弄'
      }, {
        date: '2016-05-01',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1519 弄'
      }, {
        date: '2016-05-03',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1516 弄'
      }],
      UplineRecord: {
        RecordUser: '',
        RecordName: ''
      }
    };
  },
  methods: {
    // 清空每一项的值
    clearObject(obj) {
      for (let key in obj) {
        if (obj.hasOwnProperty(key)) {
          obj[key] = '';
        }
      }
    },




    // 重置
    Resetting(){
      this.clearObject(this.UplineRecord)
    }
  },
};
</script>

<style lang="scss" scoped></style>
